<?php
/**
 * Copyright (c) Sandeep Manne (sandeep.manne@gmail.com) 
 *
 * @author  Sandeep Manne
 * @since   Nov 1, 2008, 3:46:48 PM
 * @version $Id: application.php 17 2009-05-22 17:33:25Z sandeep.manne $
 */

/**
 * @see Zend_Config_Ini
 */
require_once 'Zend/Config/Ini.php';
$settings = new Zend_Config_Ini(APPLICATION_PATH . '/settings/application.ini', 'default');

/**
 * @see Zend_Registry
 */
require_once 'Zend/Registry.php';
Zend_Registry::set('settings', $settings->application);

/**
 * Sets environment variables
 */
setlocale(LC_ALL, $settings->application->locale);
date_default_timezone_set($settings->application->timezone);
header('Content-Type: text/html; charset=' . $settings->application->encoding, false);

/**
 * Checks if the application is on debugging state
 */
define('DEBUG', (boolean) ((int) $settings->application->debug));

if (DEBUG) {
	error_reporting(E_ALL | E_STRICT);
	ini_set('display_startup_errors', 1);
	ini_set('display_errors', 1);
}
